<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>广告位数据管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {
		$("#name").focus();
		$("#inputForm").validate();
	});
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/ad/space/">广告位数据列表</a></li>
		<li class="active">
		<a href="${ctx}/ad/space/form?id=${adSpace.id}">广告位数据${not empty adSpace.id?'修改':'添加'}</a>
		</li>
	</ul>
	<br />

	<form:form id="inputForm" modelAttribute="adSpace" action="${ctx}/ad/space/save" method="post"
		class="form-horizontal">
		<form:hidden path="id" />
		<tags:message content="${message}" />
		<div class="control-group">
			<label class="control-label" for="name"><span style="color:red">*</span>名称:</label>
			<div class="controls">
				<form:input path="name" htmlEscape="false" maxlength="200"
					class="required" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="discription">广告位描述:</label>
			<div class="controls">
				<form:textarea path="discription" htmlEscape="false" rows="4"
					maxlength="200" class="input-xxlarge" />
			</div>
		</div>


		<div class="control-group">
			<label class="control-label" for="width">宽/高:</label>
			<div class="controls">
				<form:input path="width" style="width:60px;" htmlEscape="false"
					maxlength="10" class="number" />
				/
				<form:input path="height" style="width:60px;" htmlEscape="false"
					maxlength="10" class="number" />
				<span class="help-inline">%</span>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label" for="displayType">展示类型:</label>
			<div class="controls">
				<form:radiobutton path="displayType" value="1" />
				轮流
				<form:radiobutton path="displayType" value="2" />
				对联
				<form:radiobutton path="displayType" value="3" />
				嵌入
				<form:radiobutton path="displayType" value="4" />
				弹窗
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="adType">展示类型:</label>
			<div class="controls">
				<form:radiobutton path="adType" value="image" />
				图片
				<form:radiobutton path="adType" value="flash" />
				视频
				<form:radiobutton path="adType" value="word" />
				文字
			</div>
		</div>

		<div class="control-group">
			<label class="control-label" for="isEnable">是否启用:</label>
			<div class="controls">

				<form:radiobutton path="isEnable" value="1" />
				是
				<form:radiobutton path="isEnable" value="0" />
				否
			</div>
		</div>
		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存" />&nbsp;
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)" />
		</div>
	</form:form>
</body>
</html>
